Repository navigation
Reject ISMNs (979-0) as ISBN-13s [patch] - #459
Merged
Merged
Conversation
979-0 is the International Standard Music Number range for printed music, not an ISBN range, and an ISMN carries a valid EAN-13 check digit, so it passed as an Isbn on its 979 prefix alone. Fixes #455 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BT7W7buDP2wr6DWYZ2xKeQ
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes #455
Summary
IsIsbnAttribute.IsValidIsbn13now rejects values starting with9790. That prefix is the International Standard Music Number (ISMN) range for printed music, not an ISBN range. An ISMN has a valid EAN-13 check digit, so before this change it passed as anIsbnon its979prefix alone.978and the other979prefixes (979-1x,979-8) still validate.IsbnandIsIsbnAttribute, and the rules table in theSemantics.Strings.IdentifiersREADME, now mention the exclusion.Tests
Create_Ismn_Throws/TryCreate_Ismn_ReturnsFalse:979-0-2600-0043-8and9790060115615are rejected.Create_ValidIsbn13With979Prefix_Succeedsstill passes, so979-10-90636-07-1still validates.Semantics.Testsuite passes on net10.0 (1695 passed, 8 skipped).Generated by Claude Code